/*
 * @Author: admin@attacker.club
 * @Date: 2022-07-13 19:08:31
 * @LastEditTime: 2022-08-17 07:26:52
 * @Description: 
 */
import request from '@/utils/request'


// 新增
export function createGroup(data) {
  return request({
    url: '/asset/groups/',
    method: 'post',
    data
  })
}

// 删除
export function deleteGroup(id) {
  return request({
    url: `/asset/groups/${id}/`,
    method: 'delete'
  })
}
// 修改
export function updateGroup(id, data) {
  return request({
    url: `/asset/groups/${id}/`,
    method: 'put',
    data
  })
}

// 获取列表
export function getGroups(data) {
  return request({
    url: '/asset/groups/',
    method: 'get',
    params: data
  })
}


// 获取详情
export function getGroup(id) {
  return request({
    url: `/asset/groups/${id}/`,
    method: 'get'
  })
}